{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/usr/lib64/python2.7/site-packages/matplotlib/collections.py:590: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison\n",
      "  if self._edgecolors == str('face'):\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXEAAAEACAYAAABF+UbAAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHTNJREFUeJzt3X+MHGd5B/Dvc3YuPceEcL7UxnFIItQQN0rstS3LoVRe\npTlvSlIagwqGpkRQ/ip108RFjbkoPoe7AhKG0lRIpSU0qASXmhg5iN7ZJN2jUS1CYicEEqBJIYRE\ndnDcIKAnxeGe/rG7d7tzszPzzrwz876734+08t3+mHln9vzsu8887/uKqoKIiPw0UHYDiIgoPQZx\nIiKPMYgTEXmMQZyIyGMM4kREHmMQJyLyWGQQF5G7ReSkiDzRdt+wiBwRkR+KyGEROS//ZhIRUZi4\nnvjnAVwbuO82AEdU9VIADzR/JyKiEkjcYB8RuRjA/ap6RfP37wPYqqonRWQVgLqqXpZ3Q4mIaLE0\nOfGVqnqy+fNJACsttoeIiAxkurCpjW48x+0TEZVkaYrXnBSRVap6QkReD+DFsCeJCIM7EVEKqipJ\nn5umJ34IwE3Nn28C8NWIhvCmij179pTeBlduPBc8FzwX0TdTcSWGXwLwXwDeJCLPicj7AHwMwKiI\n/BDA1c3fiYioBJHpFFV9d5eHrsmhLUREZIgjNgtQrVbLboIzeC4W8Fws4LlIL7ZOPPWGRTSvbRMR\n9SoRgeZ8YZOIiBzBIE5E5DEGcSIijzGIExF5jEGciMhjDOJERB5jECci8hiDOBGRxxjEiYg8xiBO\nROQxBnEiIo8xiBMReYxBnIjIYwziREQeYxAnIvIYgzgRkccYxImIPMYgTkTkMQZxIiKPMYgTEXmM\nQZyIyGM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aj\nNbuj3FYV6vNoxMl2twE4oqqXAnig+XukPHriHAjUpKonVPWx5s+/ROM/6+pyW1UOEVkD4K0A/glA\n4ivvvUZEXgvgd1X1bqBxfUlVf15ys8q0FMCyZrHEMgDPl9yewqjqfwL438DdbwNwT/PnewDcELed\nPII4BwKFEJGLAVQAfKvclpTmUwA+BGCu7IaU7BIAPxORz4vIMRH5RxFZVnajyqCqzwPYB+AnaFS5\nvayq3yi3VaVbqaonmz+fBLAy7gV5BPF+/6q8iIgsB3AAwM3NHnlfEZHrAbyoqsfRx73wpqUANgD4\njKpuAPArJPjK3ItE5HVo9DwvRuMb6nIR+eNSG+WQ5jSwsfE0jyD+PIAL236/EI3eeF8SkbMAfAXA\nv6jqV8tuT0neDOBtIvIjAF8CcLWIfKHkNpXlpwB+qqrfbv5+AI2g3o+uAfAjVX1JVV8FcB8afyv9\n7KSIrAIAEXk9gBfjXpBHEH8EwG+JyMUiMgjgXQAO5bAf54mIAPgcgCdV9W/Lbk9ZVPXDqnqhql6C\nxoWrB1X1vWW3qwyqegLAcyJyafOuawB8r8QmlelZAFtEZKj5f+UaNC5897NDAG5q/nwTgNiOX9q5\nU7riQKAOvwPgRgDfEZHjzft2q+pUiW1yQb+n3HYC+GKzk/MMgPeV3J5SqOrDInIAwDEArzb//Wy5\nrSqOiHwJwFYAIyLyHIA7AHwMwJdF5E8B/BjAO2O3w8E+RET+4hqbREQeYxAnIvIYgzgRkccYxImI\nPMYgTkTkMQZxIiKPMYgTEXmMQZyIyGP/D5YvL/6URnFuAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f36b80b5990>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import theano\n",
    "import theano.tensor as T\n",
    "import theano.tensor.nnet as NN\n",
    "#three most useful packages in theano\n",
    "\n",
    "import numpy as NP\n",
    "import numpy.random as RNG\n",
    "%matplotlib inline\n",
    "import matplotlib.pyplot as plt\n",
    "dot_num = 100\n",
    "x_p = NP.random.normal(3., 1, dot_num)\n",
    "y_p = NP.random.normal(6., 1, dot_num)\n",
    "label_p = NP.ones(dot_num)\n",
    "\n",
    "x_n = NP.random.normal(6., 1, dot_num)\n",
    "y_n = NP.random.normal(3., 1, dot_num)\n",
    "label_n = NP.zeros(dot_num)\n",
    "\n",
    "X_p = NP.stack([x_p,y_p]).transpose(1,0)\n",
    "X_n = NP.stack([x_n,y_n]).transpose(1,0)\n",
    "X_data = NP.concatenate([X_p,X_n])\n",
    "y_data = NP.concatenate([label_p,label_n])\n",
    "\n",
    "plt.scatter(X_p[:,0], X_p[:,1], c='b', marker='+')\n",
    "plt.scatter(X_n[:,0], X_n[:,1], c='g', marker='o')\n",
    "plt.xlim(0,10)\n",
    "plt.ylim(0,10)\n",
    "def shuffle(x,y):\n",
    "    p = RNG.permutation(len(x))\n",
    "    return x[p], y[p]\n",
    "\n",
    "X_data, y_data = shuffle(X_data, y_data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "WARNING (theano.tensor.blas): We did not found a dynamic library into the library_dir of the library we use for blas. If you use ATLAS, make sure to compile it with dynamics library.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "COMPILE DONE\n"
     ]
    }
   ],
   "source": [
    "lr = 1e-2 #learning rate\n",
    "\n",
    "#define inputs\n",
    "x=T.matrix()\n",
    "labels=T.vector()\n",
    "\n",
    "#define parameters\n",
    "W=theano.shared(RNG.uniform(-0.05, 0.05, size=(2,1)))\n",
    "b=theano.shared(NP.zeros((1,)))\n",
    "params = [W, b]\n",
    "\n",
    "#build the equation \n",
    "y_hat = NN.sigmoid(T.dot(x, W)+b)\n",
    "\n",
    "#define the loss\n",
    "loss = T.mean(NN.binary_crossentropy(y_hat,labels[:,None]))\n",
    "\n",
    "#calculate the gradient \n",
    "grads = theano.grad(loss, params)\n",
    "\n",
    "#gradient descent \n",
    "param_update = []\n",
    "for p,g in zip(params, grads):\n",
    "    param_update.append((p, p-lr*g))\n",
    "    \n",
    "#compile the theano function\n",
    "train_func = theano.function([x, labels], [loss, y_hat], updates=param_update, allow_input_downcast=True)\n",
    "print 'COMPILE DONE'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.legend.Legend at 0x7f36ca158d10>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAlAAAAJPCAYAAACzYuoLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xt8XFXd7/HvSi8QoFxKtRcKLeWiIGChoIDyag6QpiCg\n1QcsTwW56RGlBzCI3JsigjxYEXjwXhTxUhGpT+kBkoCGGg+KQFvBArUgIOVWKJSWpjRt1vkjyWSS\nTDKzZ/bea+29P+/Xqy86yc5kZWbofPNbv/3bxlorAAAAlK7K9QIAAACShgAFAAAQEAEKAAAgIAIU\nAABAQAQoAACAgAhQAAAAAQ0aoIwxtxljXjPGPJH3sZHGmGZjzEpjTJMxZufolwkAAOCPYhWon0qa\n3udjl0hqttbuK+nBrtsAAACZYYoN0jTGTJR0j7X2wK7bT0uaaq19zRgzRlKLtfaDUS8UAADAF+X0\nQI221r7W9ffXJI0OcT0AAADeq6iJ3HaWr7gWDAAAyJShZXzNa8aYMdbaV40xYyW9XuggYwzBCgAA\nJIa11pR6bDkVqEWSPt/1989L+v0gC+FPQv/MmTPH+Rr4w3OXxT88f8n9w3OX7D9BFRtj8GtJ/0/S\nB4wx/zbGnCnpW5JqjTErJR3ddRsAACAzBt3Cs9aeOsCnjo1gLQAAAInAJHIUVFNT43oJKBPPXbLx\n/CUXz122FJ0DVfYdG2Ojum8AAIAwGWNkAzSRl3MWHgAA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//vCZNmqTn\nnntOEydOLHj822+/rZEjR2rdunUaMWKEzjzzTI0fP17f+MY31NLSouOPP14bNmxQVVVnbWf06NG6\n5557dNhhh2nEiBH6+9//nutpevjhhzVr1iw999xzOuusszRmzBhde+21kqR//vOf+sAHPhB5D9TQ\nUg8EAAB+KSf4RGn33XfP/b2jo0OXXXaZ7rrrLq1ZsyYXjN544w2NGDGi39fuuuuuuWMkabvtttOG\nDRu0Zs0abdy4UVOmTMl9zlqrjo4OSdIrr7yiww47LPe5PfbYI/SfqxACFAAACCx/+63Qx375y19q\n0aJFevDBBzVhwoRcBSq/+lPoPvoaNWqUqqurtWLFCo0dO7bf58eOHasXX3wxdzv/71GiBwoAAAQ2\nevRoPfvsswN+fsOGDdpmm200cuRIvfvuu7rssst6fd5aW9KIhqqqKn3hC1/QBRdcoDVr1kiSVq9e\nraamJknSKaecop/97Gd66qmntHHjRs2dO7eCn6p0BCgAABDYpZdeqmuuuUYjR47U7373u37VpNNP\nP10TJkzQbrvtpgMOOEBHHHFEr2P6NpEPVo26/vrrtffee+vwww/XTjvtpNraWq1cuVKSNH36dF1w\nwQU6+uijte++++qYY44pqbJVKZrIAQDwlM+DNJOKQZoAAACOEKAAAAACIkABAAAERIACAAAIiAAF\nAAAQEAEKAAAgICaRAwDgsThmGiE4AhQAAJ5iBpS/2MIDAAAIiAAFAAAQEAEKAAAgIAIUAABAQAQo\nAACAgAhQAAAAARGgAAAAAiJAAQAABESAAgAACIgABQAAEBABCgAAICACFAAAQEAEKAAAgIAIUAAA\nAAERoAAAAAIiQAEAAAREgAIAAAiIAAUAABAQAQoAACAgAhQAAEBABCgAAICACFAAAAABEaAAAAAC\nIkABAAAERIACAAAIiADlSEOD6xUAAIByGWttNHdsjI3qvtPAGImHBwAAPxhjZK01pR5PBSpmDQ2d\n4Unq/C+VKAAAkocKlCNUoAAA8AcVqISYM8f1CgAAQLmoQAEAgMyjAgUAABAxAhQAAEBABCgAAICA\nCFAAAAABEaAAAAACIkABAAAERIAC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aYlcaYJmPMzoPdR+gBiiGbidYu6UJr7YckHS7pKzx3iXS+pBXi\nbNmkuUnSvdba/SQdJIm2iIQwxuwmabakKdbaA9XZ2jLT7apQxE/VmVPyXSKp2Vq7r6QHu24PKIoK\nFEM2E8pa+6q1dlnX3zeo8x/wcW5XhSCMMeMlHS/pJ5JKPpsEbhljdpJ0lLX2Nqmzz9Rau87xshDM\nUEnbdZ1ktZ2k1Y7Xg0FYa/8k6a0+Hz5J0u1df79d0qcGu48oAhRDNlPAGDNR0sGS/up2JQjoRklf\nk9TheiEIZE9Ja4wxPzXGPG6M+bExZjvXi0JprLWrJc2T9KI6z0x/21r7gNtVoQyjrbWvdf39NUmj\nBzs4igDFtkHCGWN2kHSXpPO7KlFIAGPMCZJet9YuFdWnpBkq6RBJ37PWHiLpXRXZPoA/jDG7qLN6\nMVGdVfsdjDGznC4KFbGdZ9gNmmeiCFCrJe2ed3t3dVahkADGmGGSfifpF9ba37teDwI5UtJJxph/\nSfq1pKONMT93vCaU5iVJL1lr/9Z1+y51Biokw7GS/mWtfdNau0XS3er8/xHJ8poxZowkGWPGSnp9\nsIOjCFCPStrHGDPRGDNc0mclLYrg+yBkxhgjab6kFdba77peD4Kx1l5mrd3dWrunOhtY/2CtPd31\nulCctfZVSf82xuzb9aFjJf3D4ZIQzAuSDjfGVHf9O3qsOk/kQLIskvT5rr9/XtKgRYSyBmkOhiGb\nifYxSZ+T9HdjzNKuj11qrb3f4ZpQPrbTk2W2pF92/eL5rKQzHa8HJbLWPmKMuUvS45K2dP33R25X\nhcEYY34taaqkUcaYf0u6StK3JN1pjDlb0vOSThn0PhikCQAAEEwkgzQBAADSjAAFAAAQEAEKAAAg\nIAIUAABAQAQoAACAgAhQAAAAARGgAAAAAiJAAQAABPT/AUTbd9KklBhlAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f36ca1a5750>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "print_flag = False #if you want details of trainning, just enable this flag\n",
    "fig = plt.figure(figsize=(10,10))\n",
    "plt.scatter(X_p[:,0], X_p[:,1], c='b', marker='+')\n",
    "plt.scatter(X_n[:,0], X_n[:,1], c='g', marker='o')\n",
    "\n",
    "for i in xrange(50):\n",
    "    cost, n_out = train_func(X_data, y_data)\n",
    "    if i==0:\n",
    "        plt.plot(X_data[:,0], -1.0*b.get_value()-1.0*W.get_value()[0]/W.get_value()[1]*X_data[:,0])\n",
    "    if print_flag:\n",
    "        print 'loss={0:.4f}\\tW={1:.4f};{2:.4f}   \\tb={3:.4f}'.format(cost.tolist(), W.get_value()[0][0], W.get_value()[1][0], b.get_value()[0])\n",
    "\n",
    "plt.plot(X_data[:,0], -1.0*b.get_value()-1.0*W.get_value()[0]/W.get_value()[1]*X_data[:,0])\n",
    "plt.xlim(0,10)\n",
    "plt.ylim(0,10)\n",
    "plt.legend(['init', 'trained'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
